#include "TFConstants.h"
#include "TFServices.h"

HRESULT TFServices::EmptyMethod()
{
	HRESULT HR = S_OK;

	return HR;
}


HRESULT TFServices::FadeBgIn(s8 screen)
{
	for(s8 i=31; i >= 0; i--)
	{		
		if(screen > 1) { // do both
			PA_SetBrightness(SCREEN_BOTTOM, i); // bottom
			PA_SetBrightness(SCREEN_TOP, i); // top
		}
		else { // only do one
			PA_SetBrightness(screen, i);
		}
		PA_WaitForVBL(); 
	}
	return S_OK;
}

HRESULT TFServices::FadeBgOut(s8 screen)
{
	for(s8 i=0; i <= 31; i++)
	{
		if(screen > 1) { // do both
			PA_SetBrightness(SCREEN_BOTTOM, i); // bottom
			PA_SetBrightness(SCREEN_TOP, i); // top
		}
		else { // only do one
			PA_SetBrightness(screen, i);
		}
		PA_WaitForVBL(); 
	}
	return S_OK;
}
